package io.renren.modules.pinKao.service.impl;

import io.renren.modules.pinKao.dao.PinKaoDao;
import io.renren.modules.pinKao.entity.PinKaoAndOrder;
import io.renren.modules.pinKao.entity.PinKaoCourse;
import io.renren.modules.pinKao.entity.PinKaoTeam;
import io.renren.modules.pinKao.entity.PinKaoUser;
import io.renren.modules.pinKao.service.PinKaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class PinkaoServiceImpl implements PinKaoService {

    @Autowired
    PinKaoDao pinKaoDao;

    @Override
    public void launchPinKao(PinKaoAndOrder pinKaoTeam) {
        pinKaoDao.launchPinKao(pinKaoTeam);
    }

    @Override
    public PinKaoCourse getPinKaoCourseInfo(Map map) {
        return pinKaoDao.getPinKaoCourseInfo(map);
    }

    @Override
    public void insertPinKaoUserInfo(Map map) {
        pinKaoDao.insertPinKaoUserInfo(map);
    }

    @Override
    public void addPinKaoCourseCount(int courseId) {
        pinKaoDao.addPinKaoCourseCount(courseId);
    }

    @Override
    public void joinPinKao(Map map) {
        pinKaoDao.joinPinKao(map);
    }

    @Override
    public PinKaoTeam getPinKaoTeamByTeamId(int teamId) {
        return pinKaoDao.getPinKaoTeamByTeamId(teamId);
    }

    @Override
    public void delPinKaoCourseCount(int courseId) {
        pinKaoDao.delPinKaoCourseCount(courseId);
    }

    @Override
    public void addPinKaoTeamCount(int teamId) {
        pinKaoDao.addPinKaoTeamCount(teamId);
    }

    @Override
    public void delPinKaoTeamCount(int teamId) {
        pinKaoDao.delPinKaoTeamCount(teamId);
    }

    @Override
    public List getPinKaoTeamsByCourse(Map map) {
        return pinKaoDao.getPinKaoTeamsByCourse(map);
    }

    @Override
    public void updateIsSuccessByTeamId(int teamId) {
        pinKaoDao.updateIsSuccessByTeamId(teamId);
    }

    @Override
    public void exitPinKao(Map map) {
        pinKaoDao.exitPinKao(map);
    }

    @Override
    public PinKaoUser getPinKaoUserByUserAndTeamId(Map userMap) {
        return pinKaoDao.getPinKaoUserByUserAndTeamId(userMap);
    }

    @Override
    public PinKaoTeam getPinKaoTeamByTeamIdAndUserId(Long userId, int teamId) {
        return pinKaoDao.getPinKaoTeamByTeamIdAndUserId(userId,teamId);
    }

    @Override
    public List getPinKaoCourseByClassification(Map map) {
        return pinKaoDao.getPinKaoCourseByClassification(map);
    }

    @Override
    public int getPinKaoCourseTeamCount(int courseId) {
        return pinKaoDao.getPinKaoCourseTeamCount(courseId);
    }

    @Override
    public void updateStateByCourseId(int courseId) {
        pinKaoDao.updateStateByCourseId(courseId);
    }

    @Override
    public PinKaoCourse getPinKaoCourseInfoByCourseId(int courseId) {
        return pinKaoDao.getPinKaoCourseInfoByCourseId(courseId);
    }

    @Override
    public void updateCourseCount(Map m) {
        pinKaoDao.updateCourseCount(m);
    }

    @Override
    public PinKaoTeam getPinKaoTeamByUserIds(String userId) {
        return pinKaoDao.getPinKaoTeamByUserIds(userId);
    }

    @Override
    public void updateStateByTeamId(int teamId) {
        pinKaoDao.updateStateByTeamId(teamId);
    }
}
